/*
package util;

import com.yuetile.utils.VerifyingCodeGenerator;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.PostMethod;

import java.util.HashMap;
public class SendMsg_webchineseController {
    public static HashMap<String,String> getMessageStatus(String phone)throws Exception{
        HashMap<String,String> m=new HashMap<String,String>();
        HttpClient client = new HttpClient();
        PostMethod post = new PostMethod("http://gbk.sms.webchinese.cn");
        post.addRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=gbk");//在头文件中设置转码
        String code=VerifyingCodeGenerator.generate();//验证码
        NameValuePair[] data ={ new NameValuePair("Uid", "****"),new NameValuePair("Key", "******"),new NameValuePair("smsMob",phone),new NameValuePair("smsText","您正在注册本站会员,本次验证码为:"+code+""+"有效时间为5分钟")};
        m.put("code", code);
        post.setRequestBody(data);
        client.executeMethod(post);
        Header[] headers = post.getResponseHeaders();
        int statusCode = post.getStatusCode();
        System.out.println("statusCode:"+statusCode);
        for(Header h : headers)
        {
            System.out.println(h.toString());
        }
        String result = new String(post.getResponseBodyAsString().getBytes("gbk"));
        System.out.println(result); //打印返回消息状态
        m.put("result", result);
        post.releaseConnection();
        return m;
    }
}*/
